package com.dime.physical.service.impl;

import java.util.List;

import com.dime.physical.domain.dto.SearchReportCompanyDto;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimePhysicalMrMainMapper;
import com.dime.physical.domain.DimePhysicalMrMain;
import com.dime.physical.service.IDimePhysicalMrMainService;

/**
 * 总检主Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-10
 */
@Service
public class DimePhysicalMrMainServiceImpl implements IDimePhysicalMrMainService 
{
    @Autowired
    private DimePhysicalMrMainMapper dimePhysicalMrMainMapper;

    /**
     * 查询总检主
     * 
     * @param id 总检主主键
     * @return 总检主
     */
    @Override
    public DimePhysicalMrMain selectDimePhysicalMrMainById(String id)
    {
        return dimePhysicalMrMainMapper.selectDimePhysicalMrMainById(id);
    }

    /**
     * 查询总检主列表
     * 
     * @param dimePhysicalMrMain 总检主
     * @return 总检主
     */
    @Override
    public List<DimePhysicalMrMain> selectDimePhysicalMrMainList(DimePhysicalMrMain dimePhysicalMrMain)
    {
        return dimePhysicalMrMainMapper.selectDimePhysicalMrMainList(dimePhysicalMrMain);
    }

    /**
     * 新增总检主
     * 
     * @param dimePhysicalMrMain 总检主
     * @return 结果
     */
    @Override
    public int insertDimePhysicalMrMain(DimePhysicalMrMain dimePhysicalMrMain)
    {
        dimePhysicalMrMain.setCreateTime(DateUtils.getNowDate());
        return dimePhysicalMrMainMapper.insertDimePhysicalMrMain(dimePhysicalMrMain);
    }

    /**
     * 修改总检主
     * 
     * @param dimePhysicalMrMain 总检主
     * @return 结果
     */
    @Override
    public int updateDimePhysicalMrMain(DimePhysicalMrMain dimePhysicalMrMain)
    {
        dimePhysicalMrMain.setUpdateTime(DateUtils.getNowDate());
        return dimePhysicalMrMainMapper.updateDimePhysicalMrMain(dimePhysicalMrMain);
    }

    /**
     * 批量删除总检主
     * 
     * @param ids 需要删除的总检主主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalMrMainByIds(String[] ids)
    {
        return dimePhysicalMrMainMapper.deleteDimePhysicalMrMainByIds(ids);
    }

    /**
     * 删除总检主信息
     * 
     * @param id 总检主主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalMrMainById(String id)
    {
        return dimePhysicalMrMainMapper.deleteDimePhysicalMrMainById(id);
    }

    @Override
    public List<DimePhysicalMrMain> selectDimePhysicalMrMainReportList(SearchReportCompanyDto searchReportCompanyDto) {
        return dimePhysicalMrMainMapper.selectDimePhysicalMrMainReportList(searchReportCompanyDto);
    }
}
